id_mt = {
  private = {
    __type ="id",
  },
  __index = function(t,k) return id_mt.private[k] end,
  __tostring = function(self) return self.id end,
}

function id (meta,index)
  local id = {}
  id.meta  = meta
  id.index = string.format("%09i",index)
  id.id    = id.meta..id.index
  setmetatable(id,id_mt)
  return id
end
